package main

import (
	"gitee.com/Cookie_XiaoD/video_server/scheduler/dbops"
	"github.com/julienschmidt/httprouter"
	"net/http"
)

func videoDelRecHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params) {
	vid := params.ByName("vid-id")

	if len(vid) == 0 {
		sendResponse(w, 400, "视频ID不可以为空")
		return
	}

	err := dbops.AddVideoDeletionRecord(vid)
	if err != nil {
		sendResponse(w, 500, "内部错误")
		return
	}

	sendResponse(w, 200, "")
	return

}
